import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Dash from '../views/Dash.vue'
import TeacherManagement from '../views/TeacherManagement.vue'
import StudentManagement from '../views/StudentManagement.vue'
import NoticeManagement from '../views/NoticeManagement.vue'
import SysManagement from '../views/SysManagement.vue'
import QusManagement from '../views/QusManagement.vue'
import QusList from '../views/QusList.vue'
import AddQus from '../views/AddQus.vue'
import ImportQus from '../views/ImportQus.vue'
import MatchList from '../views/MatchList.vue'
import AddMatch from '../views/AddMatch.vue'
import CourseList from '../views/CourseList.vue'
import AddCourse from '../views/AddCourse.vue'
const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/dash',
    component: Home,
    children: [
      { path: '/dash', component: Dash },
      { path: '/teacherManagement', component: TeacherManagement },
      { path: '/studentManagement', component: StudentManagement },
      { path: '/noticeManagement', component: NoticeManagement },
      { path: '/sysManagement', component: SysManagement },
      { path: '/qusManagement', component: QusManagement },
      { path: '/qusList', component: QusList },
      { path: '/addQus', component: AddQus },
      { path: '/importQus', component: ImportQus },
      { path: '/matchList', component: MatchList },
      { path: '/addMatch', component: AddMatch },
      { path: '/courseList', component: CourseList },
      { path: '/addCourse', component: AddCourse }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
